package untitled14;

public class TestArg {

    static void modifyBean(Bean bean) {
        bean.set_arg(11111);
    }
    static void modifyString(String s) {
        s = "ssssssssss";
    }
    static void modifySB(StringBuffer sb) {
        sb.append("sbsbsbsbsbsbsbsb");
    }
    static void modifyInt(int i) {
        i =111111;
    }
    static void modifyInteger(Integer integer) {
        integer = Integer.valueOf(1111111);
    }
    public static void main(String[] args) {

        Bean bean = new Bean();
        System.out.println("Bean修改前：" + bean.get_arg());
        modifyBean(bean);
        System.out.println("Bean修改后：" + bean.get_arg());

        String s = "00000";
        System.out.println("String修改前：" + s);
        modifyString(s);
        System.out.println("String修改后：" + s);

        StringBuffer sb = new StringBuffer("000");
        System.out.println("StringBuffer修改前：" + sb.toString());
        modifySB(sb);
        System.out.println("StringBuffer修改后：" + sb.toString());

        int i = 0;
        System.out.println("int修改前：" + i);
        modifyInt(i);
        System.out.println("int修改后：" + i);

        Integer integer = new Integer(0);
        System.out.println("Integer修改前：" + integer);
        modifyInteger(integer);
        System.out.println("Integer修改后：" + integer);
    }
}
class Bean {
    private int _arg = 0;

    public int get_arg() {
        return _arg;
    }
    public void set_arg(int _arg) {
        this._arg = _arg;
    }
}
